/* eslint-disable react/no-array-index-key */
import type { QuestionData } from '../../interface'
import styles from './index.module.less'

export const QnADetail = (props: { options: QuestionData['options']; titleVisible: boolean }) => {
    const { titleVisible = true } = props

    return (
        <div className={styles.box}>
            {props.options.map((item, index) => (
                <div key={index}>
                    {titleVisible && <div className={styles.title}>{item.name || '-'}</div>}
                    <div className={styles.splitLine} />
                    <div className={styles.content}>{item.score || '-'}</div>
                </div>
            ))}
        </div>
    )
}
